import React from 'react';
import { Button, Result } from 'antd';
import { history } from '@umijs/max';
import { removeToken } from '@/utils/auth';
const Page_Not_Found: React.FC = () => (
  <Result
    status="404"
    title="404"
    subTitle="抱歉，您访问的页面不存在。"
    extra={
      <>
        <Button
          type="primary"
          onClick={() => {
            history.replace('/home');
          }}
        >
          返回首页
        </Button>
        <Button
          type="primary"
          ghost
          onClick={() => {
            removeToken()
            history.replace('/login');
          }}
        >
          返回登陆页
        </Button>
      </>
    }
  />
);

export default Page_Not_Found;
